
// 计划列表页-导入计划 - 二期废弃此功能
function importVcSchedule() {
	var erows = $("#bootstrap-table").bootstrapTable('getSelections')
	if (erows.length != 1) {
		$.modal.alertWarning("请选择一条记录");
		return;
	}
	
	var oid = erows[0].oid;
    var url = ctx + "vc/project/importSchedule?oid=" + oid;
    actionImportExcelHistory('导入计划', url );
}


function importVcSchedule2() {
	var erows = $("#bootstrap-table").bootstrapTable('getSelections')
	if (erows.length != 1) {
		$.modal.alertWarning("请选择一条记录");
		return;
	}
	
	var oid = erows[0].oid;
    var url = ctx + "vc/project/importSchedule2?oid=" + oid;
    actionImportExcelHistory('导入计划', url );
}

//计划列表页-导出计划 新
function exportVcSchedule2() {
	var erows = $("#bootstrap-table").bootstrapTable('getSelections')
	if (erows.length != 1) {
		$.modal.alertWarning("请选择一条记录");
		return;
	}

	var url = ctx + 'vc/project/exportSchedule2';
	var data = {
		oid : erows[0].oid
	}
	$.modal.loading("正在导出数据，请稍候...");
	$.post(url, data, function(result) {
		if (result.code === web_status.SUCCESS) {
			window.location.href = ctx + "common/download?fileName="
					+ encodeURI(result.msg) + "&delete=" + true;
		} else if (result.code === web_status.WARNING) {
			$.modal.alertWarning(result.msg)
		} else {
			$.modal.alertError(result.msg);
		}
		$.modal.closeLoading();
	});
}